// Decompiled on 周六 2月 22 19:31:49 CST 2025 with Zomboid Decompiler v0.1.3 using Vineflower.
package zombie.scripting.objects;

import java.util.ArrayList;

public final class UniqueRecipe extends BaseScriptObject {
    private String name = null;
    private String baseRecipe = null;
    private final ArrayList<String> items = new ArrayList();
    private int hungerBonus = 0;
    private int hapinessBonus = 0;
    private int boredomBonus = 0;

    public UniqueRecipe(String _name) {
        this.setName(_name);
    }

    @Override
    public void Load(String var1, String[] string0) {
        for (int _int = 0; _int < string0.length; _int++) {
            if (!string0[_int].trim().isEmpty() && string0[_int].contains(":")) {
                String[] string1 = string0[_int].split(":");
                String string2 = string1[0].trim();
                String string3 = string1[1].trim();
                if (string2.equals("BaseRecipeItem")) {
                    this.setBaseRecipe(string3);
                } else if (string2.equals("Item")) {
                    this.items.add(string3);
                } else if (string2.equals("Hunger")) {
                    this.setHungerBonus(Integer.parseInt(string3));
                } else if (string2.equals("Hapiness")) {
                    this.setHapinessBonus(Integer.parseInt(string3));
                } else if (string2.equals("Boredom")) {
                    this.setBoredomBonus(Integer.parseInt(string3));
                }
            }
        }
    }

    public String getName() {
        return this.name;
    }

    public void setName(String _name) {
        this.name = _name;
    }

    public String getBaseRecipe() {
        return this.baseRecipe;
    }

    public void setBaseRecipe(String _baseRecipe) {
        this.baseRecipe = _baseRecipe;
    }

    public int getHungerBonus() {
        return this.hungerBonus;
    }

    public void setHungerBonus(int _hungerBonus) {
        this.hungerBonus = _hungerBonus;
    }

    public int getHapinessBonus() {
        return this.hapinessBonus;
    }

    public void setHapinessBonus(int _hapinessBonus) {
        this.hapinessBonus = _hapinessBonus;
    }

    public ArrayList<String> getItems() {
        return this.items;
    }

    public int getBoredomBonus() {
        return this.boredomBonus;
    }

    public void setBoredomBonus(int _boredomBonus) {
        this.boredomBonus = _boredomBonus;
    }
}
